import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: () => import('../views/Index.vue'),
    redirect: '/index/home'
  },
  {
    path: '/index',
    component: () => import('../views/Index.vue'),
    redirect: '/index/home',
    children: [
      {
        path: 'about',
        component: () => import('../views/AboutView.vue')
      },
      {
        path: 'home',
        component: () => import('../views/HomeView.vue')
      },
      {
        path: 'team',
        component: () => import('../views/Team.vue')
      },
      {
        path: 'phone',
        component: () => import('../views/Phone.vue')
      },
    ]
  },

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
